package com.itbupt.domain.order.service;

import com.itbupt.domain.order.model.entity.PayOrderEntity;
import com.itbupt.domain.order.model.entity.ShopCartEntity;
import lombok.extern.slf4j.Slf4j;

import java.util.List;

/**
 * @Author dingchang
 * @Date 2025/5/10 0:19
 * @Description: 订单服务接口
 */
public interface IOrderService {

    // 创建订单
    PayOrderEntity createOrder(ShopCartEntity shopCartEntity) throws Exception;

    // 查询超时未支付订单
    List<String> queryNoPayNotifyOrder();

    // 接收回调消息后，更新订单状态，并发送MQ
    void changeOrderPaySuccess(String orderId);

    // 查询超时未支付订单
    List<String> queryTimeoutCloseOrderList();

    // 关闭订单 - 状态为 close
    boolean changeOrderClose(String orderId);
}
